#pragma once

#include <kinc/input/keyboard.h>

namespace Kore {
	enum KeyCode {
		KeyUnknown = KINC_KEY_UNKNOWN,
		KeyBack = KINC_KEY_BACK, // Android
		KeyCancel = KINC_KEY_CANCEL,
		KeyHelp = KINC_KEY_HELP,
		KeyBackspace = KINC_KEY_BACKSPACE,
		KeyTab = KINC_KEY_TAB,
		KeyClear = KINC_KEY_CLEAR,
		KeyReturn = KINC_KEY_RETURN,
		KeyShift = KINC_KEY_SHIFT,
		KeyControl = KINC_KEY_CONTROL,
		KeyAlt = KINC_KEY_ALT,
		KeyPause = KINC_KEY_PAUSE,
		KeyCapsLock = KINC_KEY_CAPS_LOCK,
		KeyKana = KINC_KEY_KANA,
		KeyHangul = KINC_KEY_HANGUL,
		KeyEisu = KINC_KEY_EISU,
		KeyJunja = KINC_KEY_JUNJA,
		KeyFinal = KINC_KEY_FINAL,
		KeyHanja = KINC_KEY_HANJA,
		KeyKanji = KINC_KEY_KANJI,
		KeyEscape = KINC_KEY_ESCAPE,
		KeyConvert = KINC_KEY_CONVERT,
		KeyNonConvert = KINC_KEY_NON_CONVERT,
		KeyAccept = KINC_KEY_ACCEPT,
		KeyModeChange = KINC_KEY_MODE_CHANGE,
		KeySpace = KINC_KEY_SPACE,
		KeyPageUp = KINC_KEY_PAGE_UP,
		KeyPageDown = KINC_KEY_PAGE_DOWN,
		KeyEnd = KINC_KEY_END,
		KeyHome = KINC_KEY_HOME,
		KeyLeft = KINC_KEY_LEFT,
		KeyUp = KINC_KEY_UP,
		KeyRight = KINC_KEY_RIGHT,
		KeyDown = KINC_KEY_DOWN,
		KeySelect = KINC_KEY_SELECT,
		KeyPrint = KINC_KEY_PRINT,
		KeyExecute = KINC_KEY_EXECUTE,
		KeyPrintScreen = KINC_KEY_PRINT_SCREEN,
		KeyInsert = KINC_KEY_INSERT,
		KeyDelete = KINC_KEY_DELETE,
		Key0 = KINC_KEY_0,
		Key1 = KINC_KEY_1,
		Key2 = KINC_KEY_2,
		Key3 = KINC_KEY_3,
		Key4 = KINC_KEY_4,
		Key5 = KINC_KEY_5,
		Key6 = KINC_KEY_6,
		Key7 = KINC_KEY_7,
		Key8 = KINC_KEY_8,
		Key9 = KINC_KEY_9,
		KeyColon = KINC_KEY_COLON,
		KeySemicolon = KINC_KEY_SEMICOLON,
		KeyLessThan = KINC_KEY_LESS_THAN,
		KeyEquals = KINC_KEY_EQUALS,
		KeyGreaterThan = KINC_KEY_GREATER_THAN,
		KeyQuestionMark = KINC_KEY_QUESTIONMARK,
		KeyAt = KINC_KEY_AT,
		KeyA = KINC_KEY_A,
		KeyB = KINC_KEY_B,
		KeyC = KINC_KEY_C,
		KeyD = KINC_KEY_D,
		KeyE = KINC_KEY_E,
		KeyF = KINC_KEY_F,
		KeyG = KINC_KEY_G,
		KeyH = KINC_KEY_H,
		KeyI = KINC_KEY_I,
		KeyJ = KINC_KEY_J,
		KeyK = KINC_KEY_K,
		KeyL = KINC_KEY_L,
		KeyM = KINC_KEY_M,
		KeyN = KINC_KEY_N,
		KeyO = KINC_KEY_O,
		KeyP = KINC_KEY_P,
		KeyQ = KINC_KEY_Q,
		KeyR = KINC_KEY_R,
		KeyS = KINC_KEY_S,
		KeyT = KINC_KEY_T,
		KeyU = KINC_KEY_U,
		KeyV = KINC_KEY_V,
		KeyW = KINC_KEY_W,
		KeyX = KINC_KEY_X,
		KeyY = KINC_KEY_Y,
		KeyZ = KINC_KEY_Z,
		KeyWin = KINC_KEY_WIN,
		KeyContextMenu = KINC_KEY_CONTEXT_MENU,
		KeySleep = KINC_KEY_SLEEP,
		KeyNumpad0 = KINC_KEY_NUMPAD_0,
		KeyNumpad1 = KINC_KEY_NUMPAD_1,
		KeyNumpad2 = KINC_KEY_NUMPAD_2,
		KeyNumpad3 = KINC_KEY_NUMPAD_3,
		KeyNumpad4 = KINC_KEY_NUMPAD_4,
		KeyNumpad5 = KINC_KEY_NUMPAD_5,
		KeyNumpad6 = KINC_KEY_NUMPAD_6,
		KeyNumpad7 = KINC_KEY_NUMPAD_7,
		KeyNumpad8 = KINC_KEY_NUMPAD_8,
		KeyNumpad9 = KINC_KEY_NUMPAD_9,
		KeyMultiply = KINC_KEY_MULTIPLY,
		KeyAdd = KINC_KEY_ADD,
		KeySeparator = KINC_KEY_SEPARATOR,
		KeySubtract = KINC_KEY_SUBTRACT,
		KeyDecimal = KINC_KEY_DECIMAL,
		KeyDivide = KINC_KEY_DIVIDE,
		KeyF1 = KINC_KEY_F1,
		KeyF2 = KINC_KEY_F2,
		KeyF3 = KINC_KEY_F3,
		KeyF4 = KINC_KEY_F4,
		KeyF5 = KINC_KEY_F5,
		KeyF6 = KINC_KEY_F6,
		KeyF7 = KINC_KEY_F7,
		KeyF8 = KINC_KEY_F8,
		KeyF9 = KINC_KEY_F9,
		KeyF10 = KINC_KEY_F10,
		KeyF11 = KINC_KEY_F11,
		KeyF12 = KINC_KEY_F12,
		KeyF13 = KINC_KEY_F13,
		KeyF14 = KINC_KEY_F14,
		KeyF15 = KINC_KEY_F15,
		KeyF16 = KINC_KEY_F16,
		KeyF17 = KINC_KEY_F17,
		KeyF18 = KINC_KEY_F18,
		KeyF19 = KINC_KEY_F19,
		KeyF20 = KINC_KEY_F20,
		KeyF21 = KINC_KEY_F21,
		KeyF22 = KINC_KEY_F22,
		KeyF23 = KINC_KEY_F23,
		KeyF24 = KINC_KEY_F24,
		KeyNumLock = KINC_KEY_NUM_LOCK,
		KeyScrollLock = KINC_KEY_SCROLL_LOCK,
		KeyWinOemFjJisho = KINC_KEY_WIN_OEM_FJ_JISHO,
		KeyWinOemFjMasshou = KINC_KEY_WIN_OEM_FJ_MASSHOU,
		KeyWinOemFjTouroku = KINC_KEY_WIN_OEM_FJ_TOUROKU,
		KeyWinOemFjLoya = KINC_KEY_WIN_OEM_FJ_LOYA,
		KeyWinOemFjRoya = KINC_KEY_WIN_OEM_FJ_ROYA,
		KeyCircumflex = KINC_KEY_CIRCUMFLEX,
		KeyExclamation = KINC_KEY_EXCLAMATION,
		KeyDoubleQuote = KINC_KEY_DOUBLE_QUOTE,
		KeyHash = KINC_KEY_HASH,
		KeyDollar = KINC_KEY_DOLLAR,
		KeyPercent = KINC_KEY_PERCENT,
		KeyAmpersand = KINC_KEY_AMPERSAND,
		KeyUnderscore = KINC_KEY_UNDERSCORE,
		KeyOpenParen = KINC_KEY_OPEN_PAREN,
		KeyCloseParen = KINC_KEY_CLOSE_PAREN,
		KeyAsterisk = KINC_KEY_ASTERISK,
		KeyPlus = KINC_KEY_PLUS,
		KeyPipe = KINC_KEY_PIPE,
		KeyHyphenMinus = KINC_KEY_HYPHEN_MINUS,
		KeyOpenCurlyBracket = KINC_KEY_OPEN_CURLY_BRACKET,
		KeyCloseCurlyBracket = KINC_KEY_CLOSE_CURLY_BRACKET,
		KeyTilde = KINC_KEY_TILDE,
		KeyVolumeMute = KINC_KEY_VOLUME_MUTE,
		KeyVolumeDown = KINC_KEY_VOLUME_DOWN,
		KeyVolumeUp = KINC_KEY_VOLUME_UP,
		KeyComma = KINC_KEY_COMMA,
		KeyPeriod = KINC_KEY_PERIOD,
		KeySlash = KINC_KEY_SLASH,
		KeyBackQuote = KINC_KEY_BACK_QUOTE,
		KeyOpenBracket = KINC_KEY_OPEN_BRACKET,
		KeyBackSlash = KINC_KEY_BACK_SLASH,
		KeyCloseBracket = KINC_KEY_CLOSE_BRACKET,
		KeyQuote = KINC_KEY_QUOTE,
		KeyMeta = KINC_KEY_META,
		KeyAltGr = KINC_KEY_ALT_GR,
		KeyWinIcoHelp = KINC_KEY_WIN_ICO_HELP,
		KeyWinIco00 = KINC_KEY_WIN_ICO_00,
		KeyWinIcoClear = KINC_KEY_WIN_ICO_CLEAR,
		KeyWinOemReset = KINC_KEY_WIN_OEM_RESET,
		KeyWinOemJump = KINC_KEY_WIN_OEM_JUMP,
		KeyWinOemPA1 = KINC_KEY_WIN_OEM_PA1,
		KeyWinOemPA2 = KINC_KEY_WIN_OEM_PA2,
		KeyWinOemPA3 = KINC_KEY_WIN_OEM_PA3,
		KeyWinOemWSCTRL = KINC_KEY_WIN_OEM_WSCTRL,
		KeyWinOemCUSEL = KINC_KEY_WIN_OEM_CUSEL,
		KeyWinOemATTN = KINC_KEY_WIN_OEM_ATTN,
		KeyWinOemFinish = KINC_KEY_WIN_OEM_FINISH,
		KeyWinOemCopy = KINC_KEY_WIN_OEM_COPY,
		KeyWinOemAuto = KINC_KEY_WIN_OEM_AUTO,
		KeyWinOemENLW = KINC_KEY_WIN_OEM_ENLW,
		KeyWinOemBackTab = KINC_KEY_WIN_OEM_BACK_TAB,
		KeyATTN = KINC_KEY_ATTN,
		KeyCRSEL = KINC_KEY_CRSEL,
		KeyEXSEL = KINC_KEY_EXSEL,
		KeyEREOF = KINC_KEY_EREOF,
		KeyPlay = KINC_KEY_PLAY,
		KeyZoom = KINC_KEY_ZOOM,
		KeyPA1 = KINC_KEY_PA1,
		KeyWinOemClear = KINC_KEY_WIN_OEM_CLEAR
	};

	class Keyboard {
	public:
		static Keyboard* the();
		void (*KeyDown)(KeyCode code);
		void (*KeyUp)(KeyCode code);
		void (*KeyPress)(wchar_t character);
		void clear();
		Keyboard();
	};
}
